
<script type="text/javascript">
  DD_belatedPNG.fix('.headerMid h2 img');
</script>
<![endif]-->
<!-- 色系CSS -->
<!-- 色系CSS -->
<div id="mask">
  <!-- 解决IE6无法遮盖select等html元素的问题 -->
  <!--[if lte IE 6]>
  <iframe frameborder="0" src="about:blank" tabindex="-1"></iframe><![endif]-->
</div>
<div id="mask2">
  <!-- 解决IE6无法遮盖select等html元素的问题 -->
  <!--[if lte IE 6]>
  <iframe frameborder="0" src="about:blank" tabindex="-1"></iframe><![endif]-->
</div>
<div id="infoWindow" class="window">
  <table class="window">
    <tr>
      <td class="popcontent" id="windowInsideDIV"></td>
    </tr>
  </table>
</div>
<div id="colorPricker_div"></div>
<div id="warpper">
  <div id="header">
    <div id="phantomjs_cut_top_header">
      <div class="headerTop main-f-color" style="background-color: #eee">
        <div class="container clearfix">
          <ul class="fl">
            <li>
              <a href="/"> <s class="home"></s> <span>网站首页</span> </a>
            </li>
            <li class="line">
              |
            </li>
            <li class="myYT wei">
              <a class="wechat" href="javascript:;">
                <div class="myYTTop">
                  <s class="weixin"></s>
                  <span>微信</span>
                  <b></b>
                </div>
                <div class="myYTBom">
                  <img width="108px" height="108px"
                       src="__STATIC__/images/qrcode_vmall_app01.png"/>
                </div>
              </a>
              &nbsp;
            </li>
            <li class="line" style="margin-left: 15px">
              |
            </li>
            <li class="myYT wei">
              <a class="wechat" href="javascript:;">
                <div class="myYTTop" style="width: 85px">
                  <s class="shouji"></s>
                  <span>手机访问</span>
                  <b style="left: 95px"></b>
                </div>
                <div class="myYTBom">
                  <img style="width: 108px;height: 108px"
                       src="__STATIC__/images/qrcode_vmall_app01.png"/>
                </div>
              </a>
              &nbsp;
            </li>
          </ul>
          <ul class="fr">
            <li class="nologin">
              <a href="{:U('Home/user/login')}">Hi&nbsp;请登录</a>
            </li>
            <li class="nologin">
              <a href="{:U('Home/user/reg')}">免费注册</a>
            </li>
            <li class="islogin">
              <a href="{:U('Home/user/index')}" class="userinfo" title="" target="_self"></a>
            </li>
            <li class="islogin">
              <a href="{:U('Home/user/logout')}" style="margin:0 10px;" title="退出" target="_self">退出</a>
            </li>
            <li class="line">
              |
            </li>
            <li>
              <a href="{:U('/Home/User/order_list')}">我的订单</a>
            </li>
            <li class="line">
              |
            </li>
            <li>
              <a href="{:U('/Home/User/account')}">我的积分</a>
            </li>
            <li class="line">
              |
            </li>
            <li>
              <a href="{:U('/Home/User/coupon')}">我的优惠券</a>
            </li>
            <li class="line">
              |
            </li>
            <li>
              <a href="{:U('/Home/User/goods_collect')}">我的收藏夹</a>
            </li>
            <li class="line">
              |
            </li>
            <li>
              <a href="{:U('/Home/User/comment')}">我的评论</a>
            </li>

          </ul>
        </div>
      </div>
      <div class="topBanner">
        <adv pid="1" limit="1" item="v">
        <a href="{$v.ad_link}" style="background:url('{$v[ad_code]}') no-repeat center top"></a>
        </adv>
      </div>
      <div class="headerMid pt20 pb20 header-footer-bg-color header-f-color link-f-color link-f-color-hover">
        <div class="container clearfix">
          <h1 class="fl"><a href="/"><img height="80px"
                                          src="__PUBLIC__/images/newLogo.png"/></a></h1>

          <div id="headerCart_div" style="display: ">
            <div class="topCart fr" onmouseover="showHeaderCart()" onmouseout="hideHeaderCart()">
              <div class="cartT nav-bg-color nav-f-color clearfix">
                <span class="fl">购物车<i class="red-color" id="cart_quantity"></i>件 </span><b class="bgAccow fr"></b>
              </div>
              <div class="cartBd" onmouseover="showHeaderCartBg()">
                <div class="cartMain">
                  <!--<div class="goodCart">-->
                    <!--<h4>最新加入的商品</h4>-->
                    <!--<ul class="cartMainList">-->
                      <!--<li>-->
                        <!--<img class="fl" src="__STATIC__/images/200_5508dfe6n35a250f6.jpg!cc_50x64.jpg"/>-->
                        <!--<div class="cartMName fl">-->
                          <!--<a href="/product/82521.html"-->
                             <!--title="裂帛 2016夏季新款 假两件绣花长裙圆领短袖连衣裙女51140907 蓝色 L">裂帛 2016夏季新款-->
                            <!--假两件绣花长裙圆领短袖连衣裙女51...</a>-->
                        <!--</div>-->
                        <!--<div class="cartPrice fr">-->
                          <!--<p><span class="red-color">¥<i class="fontFArial">279.80</i></span>-->
                            <!--<span class="fontFArial">x 1</span>-->
                          <!--</p>-->
                          <!--<p>-->
                            <!--<a href="javascript:;"-->
                               <!--onclick="javascript:$('#cartChoiceID').val('normal-82521-82995-0');doAction('cart', 'deleteCartProductHeader')">删除</a>-->
                          <!--</p>-->
                        <!--</div>-->
                      <!--</li>-->
                    <!--</ul>-->
                  <!--</div>-->
                  <!--<div class="clear"></div>-->
                  <!--<div class="goodCartBom">-->
                    <!--共 <span class="fontFArial red-color">0</span> 件商品<span class="pl10">共计<b-->
                          <!--class="red-color fontS16">¥<i-->
                          <!--class="fontFArial">0</i></b>元 </span>-->
                  <!--</div>-->
                  <!--<div class="goodBtnDiv">-->
                    <!--<a class="goodsBtn btn-bg-color btn-f-color" href="/cart.html">去购物车结算</a>-->
                  <!--</div>-->
                  <!--<div class="clear"></div>-->
                <!--</div>-->
              </div>
            </div>
          </div>
          <form name="sourch_form" id="sourch_form" method="post" action="{:U('/Home/Goods/search')}">
          <div class="fr">
          <ul class="searchTil">
            <li class="nav-bg-color nav-f-color" onclick="$('#searchTypeID').val('product')">商品</li>
            <!--<li class="" onclick="$('#searchTypeID').val('supplier')">商户</li>-->
          </ul>
          <div class="clear"></div>
          <div class="searchDiv nav-border-color">
            <div class="block">
              <input type="text" placeholder="请输入要搜索的关键字" class="searchInput fl" name="q"
                     id="keywordInput" onkeydown="if(event.keyCode==13) setKeyword()"
                     value=""/>
              <a class="searchBtn nav-bg-color nav-f-color fr" href="javascript:void(0);"
                 onclick="if($.trim($('#keywordInput').val()) != '') $('#sourch_form').submit();"></a>
            </div>
          </div>
          <div class="clear"></div>
          <ul class="searchBomList">
            <foreach name="tpshop_config.hot_keywords" item="wd" key="k">
              <li class="header-f-color" style="cursor:pointer;"><a href="{:U('Home/Goods/search',array('q'=>$wd))}" <if condition="$k eq 0">class="ht"</if>>{$wd}</a>
              </li>
            </foreach>
          </ul>
        </div>
        </form>
      </div>
    </div>
  </div>
</div>
  <script type="text/javascript">
    $(document).ready(function(){
      get_cart_num();
      var uname= getCookie('uname');
      if(uname == ''){
        $('.islogin').remove();
        $('.nologin').show();
      }else{
        $('.nologin').remove();
        $('.islogin').show();
        $('.userinfo').html(decodeURIComponent(uname));
      }
    });

    function get_cart_num(){
      console.log(1111);
      var cart_cn = getCookie('cn');
      console.log(2222);
      console.log(cart_cn);
      if(cart_cn == ''){
        $.ajax({
          type : "GET",
          url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
          success: function(data){
            cart_cn = getCookie('cn');
            $('#cart_quantity').html(cart_cn);
          }
        });
      }
      $('#cart_quantity').html(cart_cn);
    }
  </script>